import request from '@/utils/request';

export function getAllUser(current, limit, query) {
  return request({
    url: `/museum-role/super/user/pageUserCondition/${current}/${limit}`,
    method: 'post',
    data: query
  });
}

export function addUser(params) {
  return request({
    url: '/museum-role/super/user/addUser',
    method: 'post',
    data: params
  });
}

export function updateUser(params, userStatus) {
  const user = JSON.parse(JSON.stringify(params));
  user.userStatus = userStatus;
  return request({
    url: '/museum-role/super/user/updateUser',
    method: 'put',
    data: user
  });
}

export function deleteUser(userId) {
  return request({
    url: `/museum-role/super/user/deleteUser/${userId}`,
    method: 'delete'
  });
}
